package com.fw.ui.view.settings.usercontrol.bouser;

import static org.springframework.beans.factory.config.BeanDefinition.SCOPE_PROTOTYPE;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;

import com.fw.service.bean.EntryBean;
import com.fw.service.bouser.bean.BOUserBean;
import com.fw.ui.bao.MasterDataBAO;
import com.fw.ui.bao.MessageBAO;
import com.fw.ui.core.ViewDescription;
import com.fw.ui.util.UICommonUtils;
import com.fw.ui.util.VaadinApplicationObjectSupport;
import com.fw.ui.util.validator.StringLengthValidator;
import com.fw.ui.view.AbstractView;
import com.fw.ui.view.settings.usercontrol.bouser.event.CreateBOUserCancelButtonClickListener;
import com.fw.ui.view.settings.usercontrol.bouser.event.CreateBOUserClearButtonClickListener;
import com.fw.ui.view.settings.usercontrol.bouser.event.CreateBOUserEmailValueChangeListener;
import com.fw.ui.view.settings.usercontrol.bouser.event.CreateBOUserEmployeeIdValueChangeListener;
import com.fw.ui.view.settings.usercontrol.bouser.event.CreateBOUserEmployeeNameValueChangeListener;
import com.fw.ui.view.settings.usercontrol.bouser.event.CreateBOUserGroupBlurListener;
import com.fw.ui.view.settings.usercontrol.bouser.event.CreateBOUserGroupValueChangeListener;
import com.fw.ui.view.settings.usercontrol.bouser.event.CreateBOUserSaveButtonClickListener;
import com.fw.ui.view.settings.usercontrol.bouser.event.CreateBOUserUsernameValueChangeListener;
import com.vaadin.data.validator.EmailValidator;
import com.vaadin.data.validator.RegexpValidator;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.ComboBox;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Panel;
import com.vaadin.ui.TextField;
import com.vaadin.ui.VerticalLayout;

@org.springframework.stereotype.Component
@Scope(SCOPE_PROTOTYPE)
@ViewDescription(name = "settings-user-control-bouser-new", path = "/settings/user-control/bouser-new")
public class CreateBOUserView extends AbstractView {

    /**
     * 
     */
    private static final long serialVersionUID = 252348638703410597L;

    @Autowired
    protected transient VaadinApplicationObjectSupport app;

    @Autowired
    private MasterDataBAO masterDataBAO;
    @Autowired
    private MessageBAO messageBAO;

    /**
     * BEAN
     */
    private BOUserBean boUserBean = new BOUserBean();

    /**
     * EVENT
     */
    @Autowired
    private CreateBOUserClearButtonClickListener createBOUserClearButtonClickListener;
    @Autowired
    private CreateBOUserSaveButtonClickListener createBOUserSaveButtonClickListener;
    @Autowired
    private CreateBOUserUsernameValueChangeListener createBOUserUsernameValueChangeListener;
    @Autowired
    private CreateBOUserEmailValueChangeListener createBOUserEmailValueChangeListener;
    @Autowired
    private CreateBOUserEmployeeIdValueChangeListener createBOUserEmployeeIdValueChangeListener;
    @Autowired
    private CreateBOUserEmployeeNameValueChangeListener createBOUserEmployeeNameValueChangeListener;
    @Autowired
    private CreateBOUserGroupValueChangeListener createBOUserGroupValueChangeListener;
    @Autowired
    private CreateBOUserGroupBlurListener createBOUserGroupBlurListener;
    @Autowired
    private CreateBOUserCancelButtonClickListener createBOUserCancelButtonClickListener;

    /**
     * COMPONENT
     */
    private Panel createBOUserPanel = new Panel();

    private Label lblUsername = new Label("", ContentMode.HTML);
    private Label lblEmail = new Label("", ContentMode.HTML);
    private Label lblEmailFormat = new Label("", ContentMode.HTML);
    private Label lblEmployeeId = new Label("", ContentMode.HTML);
    private Label lblEmployeeName = new Label("", ContentMode.HTML);
    private Label lblGroup = new Label("", ContentMode.HTML);

    private Label lblUsernameValidateMessage = new Label("", ContentMode.HTML);
    private Label lblEmailValidateMessage = new Label("", ContentMode.HTML);
    private Label lblEmployeeIdValidateMessage = new Label("", ContentMode.HTML);
    private Label lblEmployeeNameValidateMessage = new Label("", ContentMode.HTML);
    private Label lblGroupValidateMessage = new Label("", ContentMode.HTML);

    private HorizontalLayout row1Validate = new HorizontalLayout();
    private HorizontalLayout row2Validate = new HorizontalLayout();
    private HorizontalLayout row4Validate = new HorizontalLayout();
    private HorizontalLayout row5Validate = new HorizontalLayout();
    private HorizontalLayout row6Validate = new HorizontalLayout();

    private Button btnSave = new Button();
    private Button btnClear = new Button();
    private Button btnCancel = new Button();

    private TextField txtUsername = new TextField();
    private TextField txtEmail = new TextField();
    private TextField txtEmployeeId = new TextField();
    private TextField txtEmployeeName = new TextField();
    private ComboBox cbbGroup = new ComboBox();

    @Override
    public void updateStrings() {
	this.lblUsername.setValue(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.label.username"));
	this.lblEmail.setValue(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.label.email"));
	this.lblEmailFormat.setValue(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.label.email.ex"));
	this.lblEmployeeId.setValue(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.label.employee.id"));
	this.lblEmployeeName.setValue(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.label.employee.name"));
	this.lblGroup.setValue(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.label.group"));
	this.cbbGroup.setInputPrompt(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.inputprompt.group"));

	this.btnSave.setCaption(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.button.save"));
	this.btnClear.setCaption(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.button.clear"));
	this.btnCancel.setCaption(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.button.cancel"));

	this.createBOUserPanel.setCaption(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.title"));
    }

    @Override
    public void init() {
	this.setSizeFull();

	this.createBOUserPanel.setSizeFull();
	this.createBOUserPanel.setId("createBOUserPanel");

	this.lblUsername.setWidth("150px");
	this.lblEmail.setWidth("150px");
	this.lblEmployeeId.setWidth("150px");
	this.lblEmployeeName.setWidth("150px");
	this.lblGroup.setWidth("150px");
	this.lblEmailFormat.setWidth("200px");
	this.cbbGroup.setWidth("200px");
	this.txtUsername.setWidth("200px");
	this.txtEmail.setWidth("200px");
	this.txtEmployeeId.setWidth("200px");
	this.txtEmployeeName.setWidth("200px");

	this.lblUsernameValidateMessage.setId("lblUsernameValidateMessage" + UICommonUtils.INCLUDE_VALUE_COMPONENT_PREFIX);
	this.lblEmailValidateMessage.setId("lblEmailValidateMessage" + UICommonUtils.INCLUDE_VALUE_COMPONENT_PREFIX);
	this.lblEmployeeIdValidateMessage.setId("lblEmployeeIdValidateMessage" + UICommonUtils.INCLUDE_VALUE_COMPONENT_PREFIX);
	this.lblEmployeeNameValidateMessage.setId("lblEmployeeNameValidateMessage" + UICommonUtils.INCLUDE_VALUE_COMPONENT_PREFIX);
	this.lblGroupValidateMessage.setId("lblGroupValidateMessage" + UICommonUtils.INCLUDE_VALUE_COMPONENT_PREFIX);

	this.row1Validate.setId("row1Validate" + UICommonUtils.INCLUDE_VISIBLE_COMPONENT_PREFIX);
	this.row2Validate.setId("row2Validate" + UICommonUtils.INCLUDE_VISIBLE_COMPONENT_PREFIX);
	this.row4Validate.setId("row4Validate" + UICommonUtils.INCLUDE_VISIBLE_COMPONENT_PREFIX);
	this.row5Validate.setId("row5Validate" + UICommonUtils.INCLUDE_VISIBLE_COMPONENT_PREFIX);
	this.row6Validate.setId("row6Validate" + UICommonUtils.INCLUDE_VISIBLE_COMPONENT_PREFIX);

	this.lblUsernameValidateMessage.setSizeUndefined();
	this.lblEmailValidateMessage.setSizeUndefined();
	this.lblEmployeeIdValidateMessage.setSizeUndefined();
	this.lblEmployeeNameValidateMessage.setSizeUndefined();
	this.lblGroupValidateMessage.setSizeUndefined();

	this.lblUsernameValidateMessage.addStyleName("validate-error");
	this.lblEmailValidateMessage.addStyleName("validate-error");
	this.lblEmployeeIdValidateMessage.addStyleName("validate-error");
	this.lblEmployeeNameValidateMessage.addStyleName("validate-error");
	this.lblGroupValidateMessage.addStyleName("validate-error");

	this.txtUsername.setMaxLength(50);
	this.txtEmail.setMaxLength(200);
	this.txtEmployeeId.setMaxLength(20);
	this.txtEmployeeName.setMaxLength(150);

	this.cbbGroup.setNullSelectionAllowed(false);
	this.cbbGroup.setTextInputAllowed(false);

	VerticalLayout mainLayout = new VerticalLayout();
	mainLayout.setSizeFull();
	mainLayout.setSizeUndefined();
	mainLayout.setSpacing(true);
	mainLayout.setWidth("100%");

	this.createBOUserPanel.setContent(mainLayout);

	VerticalLayout formLayout = new VerticalLayout();
	formLayout.setId("formPanel");
	formLayout.setSizeUndefined();
	formLayout.setWidth("100%");
	formLayout.setSpacing(true);

	HorizontalLayout row0 = new HorizontalLayout();
	HorizontalLayout row1 = new HorizontalLayout();
	HorizontalLayout row2 = new HorizontalLayout();
	HorizontalLayout row3 = new HorizontalLayout();
	HorizontalLayout row4 = new HorizontalLayout();
	HorizontalLayout row5 = new HorizontalLayout();
	HorizontalLayout row6 = new HorizontalLayout();
	HorizontalLayout row7 = new HorizontalLayout();
	HorizontalLayout row8 = new HorizontalLayout();
	HorizontalLayout row9 = new HorizontalLayout();

	row1.setSpacing(true);
	row2.setSpacing(true);
	row3.setSpacing(true);
	row4.setSpacing(true);
	row5.setSpacing(true);
	row6.setSpacing(true);
	row7.setSpacing(true);
	row8.setSpacing(true);
	row1Validate.setSpacing(true);
	row2Validate.setSpacing(true);
	row4Validate.setSpacing(true);
	row5Validate.setSpacing(true);
	row6Validate.setSpacing(true);

	row1.setSizeUndefined();
	row2.setSizeUndefined();
	row3.setSizeUndefined();
	row4.setSizeUndefined();
	row5.setSizeUndefined();
	row6.setSizeUndefined();
	row7.setSizeUndefined();
	row8.setSizeUndefined();
	row1Validate.setSizeUndefined();
	row2Validate.setSizeUndefined();
	row4Validate.setSizeUndefined();
	row5Validate.setSizeUndefined();
	row6Validate.setSizeUndefined();

	row1.setWidth("400px");
	row2.setWidth("400px");
	row3.setWidth("400px");
	row4.setWidth("400px");
	row5.setWidth("400px");
	row6.setWidth("400px");
	row7.setWidth("400px");
	row1Validate.setWidth("100%");
	row2Validate.setWidth("100%");
	row4Validate.setWidth("100%");
	row5Validate.setWidth("100%");
	row6Validate.setWidth("100%");

	this.btnSave.addStyleName("button-blue");
	this.btnClear.addStyleName("button-green");
	this.btnCancel.addStyleName("button-red");
	this.btnSave.setDisableOnClick(true);
	this.btnClear.setDisableOnClick(true);
	this.btnCancel.setDisableOnClick(true);
	this.btnSave.setWidth("70px");
	this.btnClear.setWidth("70px");
	this.btnCancel.setWidth("70px");

	Label lblSep = new Label("");
	Label lblSepValidate1 = new Label("");
	Label lblSepValidate2 = new Label("");
	Label lblSepValidate4 = new Label("");
	Label lblSepValidate5 = new Label("");
	Label lblSepValidate6 = new Label("");

	lblSep.setWidth("150px");
	lblSepValidate1.setWidth("150px");
	lblSepValidate2.setWidth("150px");
	lblSepValidate4.setWidth("150px");
	lblSepValidate5.setWidth("150px");
	lblSepValidate6.setWidth("150px");

	row1.addComponent(lblUsername);
	row1.addComponent(txtUsername);
	row1.setComponentAlignment(lblUsername, Alignment.MIDDLE_RIGHT);
	row1.setComponentAlignment(txtUsername, Alignment.MIDDLE_LEFT);

	row1Validate.addComponent(lblSepValidate1);
	row1Validate.addComponent(this.lblUsernameValidateMessage);
	row1Validate.setComponentAlignment(this.lblUsernameValidateMessage, Alignment.TOP_LEFT);

	row2.addComponent(lblEmail);
	row2.addComponent(txtEmail);
	row2.setComponentAlignment(lblEmail, Alignment.MIDDLE_RIGHT);
	row2.setComponentAlignment(txtEmail, Alignment.MIDDLE_LEFT);

	row2Validate.addComponent(lblSepValidate2);
	row2Validate.addComponent(this.lblEmailValidateMessage);
	row2Validate.setComponentAlignment(this.lblEmailValidateMessage, Alignment.TOP_LEFT);

	row3.addComponent(lblSep);
	row3.addComponent(lblEmailFormat);
	row3.setComponentAlignment(lblEmailFormat, Alignment.TOP_LEFT);

	row4.addComponent(lblEmployeeId);
	row4.addComponent(txtEmployeeId);
	row4.setComponentAlignment(lblEmployeeId, Alignment.MIDDLE_RIGHT);
	row4.setComponentAlignment(txtEmployeeId, Alignment.MIDDLE_LEFT);

	row4Validate.addComponent(lblSepValidate4);
	row4Validate.addComponent(this.lblEmployeeIdValidateMessage);
	row4Validate.setComponentAlignment(this.lblEmployeeIdValidateMessage, Alignment.TOP_LEFT);

	row5.addComponent(lblEmployeeName);
	row5.addComponent(txtEmployeeName);
	row5.setComponentAlignment(lblEmployeeName, Alignment.MIDDLE_RIGHT);
	row5.setComponentAlignment(txtEmployeeName, Alignment.MIDDLE_LEFT);

	row5Validate.addComponent(lblSepValidate5);
	row5Validate.addComponent(this.lblEmployeeNameValidateMessage);
	row5Validate.setComponentAlignment(this.lblEmployeeNameValidateMessage, Alignment.TOP_LEFT);

	row6.addComponent(lblGroup);
	row6.addComponent(cbbGroup);
	row6.setComponentAlignment(lblGroup, Alignment.MIDDLE_RIGHT);
	row6.setComponentAlignment(cbbGroup, Alignment.MIDDLE_LEFT);

	row6Validate.addComponent(lblSepValidate6);
	row6Validate.addComponent(this.lblGroupValidateMessage);
	row6Validate.setComponentAlignment(this.lblGroupValidateMessage, Alignment.TOP_LEFT);

	row8.addComponent(btnSave);
	row8.addComponent(btnClear);
	row8.addComponent(btnCancel);

	formLayout.addComponent(row0);
	formLayout.addComponent(row1);
	formLayout.addComponent(row1Validate);
	formLayout.addComponent(row2);
	formLayout.addComponent(row2Validate);
	formLayout.addComponent(row3);
	formLayout.addComponent(row4);
	formLayout.addComponent(row4Validate);
	formLayout.addComponent(row5);
	formLayout.addComponent(row5Validate);
	formLayout.addComponent(row6);
	formLayout.addComponent(row6Validate);
	formLayout.addComponent(row7);
	formLayout.addComponent(row8);
	formLayout.addComponent(row9);

	formLayout.setComponentAlignment(row1, Alignment.MIDDLE_CENTER);
	formLayout.setComponentAlignment(row2, Alignment.MIDDLE_CENTER);
	formLayout.setComponentAlignment(row3, Alignment.MIDDLE_CENTER);
	formLayout.setComponentAlignment(row4, Alignment.MIDDLE_CENTER);
	formLayout.setComponentAlignment(row5, Alignment.MIDDLE_CENTER);
	formLayout.setComponentAlignment(row6, Alignment.MIDDLE_CENTER);
	formLayout.setComponentAlignment(row7, Alignment.MIDDLE_CENTER);
	formLayout.setComponentAlignment(row8, Alignment.MIDDLE_CENTER);
	formLayout.setComponentAlignment(row1Validate, Alignment.TOP_CENTER);
	formLayout.setComponentAlignment(row2Validate, Alignment.TOP_CENTER);
	formLayout.setComponentAlignment(row4Validate, Alignment.TOP_CENTER);
	formLayout.setComponentAlignment(row5Validate, Alignment.TOP_CENTER);
	formLayout.setComponentAlignment(row6Validate, Alignment.TOP_CENTER);

	row1Validate.setVisible(false);
	row2Validate.setVisible(false);
	row4Validate.setVisible(false);
	row5Validate.setVisible(false);
	row6Validate.setVisible(false);

	mainLayout.addComponent(formLayout);
	mainLayout.setComponentAlignment(formLayout, Alignment.MIDDLE_CENTER);

	this.addComponent(this.createBOUserPanel);
	this.setComponentAlignment(this.createBOUserPanel, Alignment.TOP_CENTER);
    }

    @Override
    public void initListener() {
	this.createBOUserClearButtonClickListener.setBasedComponent(this);
	this.createBOUserSaveButtonClickListener.setBasedComponent(this);
	this.createBOUserUsernameValueChangeListener.setBasedComponent(this);
	this.createBOUserEmailValueChangeListener.setBasedComponent(this);
	this.createBOUserEmployeeIdValueChangeListener.setBasedComponent(this);
	this.createBOUserEmployeeNameValueChangeListener.setBasedComponent(this);
	this.createBOUserGroupValueChangeListener.setBasedComponent(this);
	this.createBOUserGroupBlurListener.setBasedComponent(this);
	this.createBOUserCancelButtonClickListener.setBasedComponent(this);

	this.createBOUserClearButtonClickListener.setAutoEnabled(true);
	this.createBOUserSaveButtonClickListener.setAutoEnabled(true);
	this.createBOUserCancelButtonClickListener.setAutoEnabled(true);

	this.btnClear.addClickListener(this.createBOUserClearButtonClickListener);
	this.btnSave.addClickListener(this.createBOUserSaveButtonClickListener);
	this.btnCancel.addClickListener(this.createBOUserCancelButtonClickListener);

	this.txtUsername.addValueChangeListener(this.createBOUserUsernameValueChangeListener);
	this.txtEmail.addValueChangeListener(this.createBOUserEmailValueChangeListener);
	this.txtEmployeeId.addValueChangeListener(this.createBOUserEmployeeIdValueChangeListener);
	this.txtEmployeeName.addValueChangeListener(this.createBOUserEmployeeNameValueChangeListener);
	this.cbbGroup.addValueChangeListener(this.createBOUserGroupValueChangeListener);
	this.cbbGroup.addBlurListener(this.createBOUserGroupBlurListener);
    }

    @Override
    public void initValidator() {
	this.txtEmail.setImmediate(true);
	this.txtEmail.setRequired(true);
	this.txtEmail.setRequiredError(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.email.mandatory"));
	EmailValidator emailValidator = new EmailValidator(
		this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.email.format"));
	this.txtEmail.addValidator(emailValidator);

	this.txtUsername.setImmediate(true);
	this.txtUsername.setRequired(true);
	this.txtUsername.setRequiredError(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.username.mandatory"));
	RegexpValidator usernameRegexpValidator = new RegexpValidator("[a-zA-Z0-9]*", true,
		this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.username.format"));
	StringLengthValidator uesrnameStringLengthValidator = new StringLengthValidator(
		this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.username.length"), 1, 50, false);
	this.txtUsername.addValidator(usernameRegexpValidator);
	this.txtUsername.addValidator(uesrnameStringLengthValidator);

	this.txtEmployeeId.setImmediate(true);
	this.txtEmployeeId.setRequired(true);
	this.txtEmployeeId
		.setRequiredError(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.employee.id.mandatory"));
	RegexpValidator employeeIdRegexpValidator = new RegexpValidator("[a-zA-Z0-9]*", true,
		this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.employee.id.format"));
	StringLengthValidator employeeIdStringLengthValidator = new StringLengthValidator(
		this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.employee.id.length"), 1, 20, false);
	this.txtEmployeeId.addValidator(employeeIdRegexpValidator);
	this.txtEmployeeId.addValidator(employeeIdStringLengthValidator);

	StringLengthValidator employeeNameStringLengthValidator = new StringLengthValidator(
		this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.employee.name.length"), 1, 150, true);
	this.txtEmployeeName.addValidator(employeeNameStringLengthValidator);

	this.cbbGroup.setImmediate(true);
	this.cbbGroup.setRequired(true);
	this.cbbGroup.setRequiredError(this.messageBAO.getMessage("com.fw.ui.view.settings.usercontrol.bouser.CreateBOUserView.message.group.mandatory"));
    }

    @Override
    public void initData() {
	try {
	    List<EntryBean<Long, String>> roles = masterDataBAO.selectAllBOUserRole();
	    if (roles != null) {
		for (EntryBean<Long, String> entry : roles) {
		    this.cbbGroup.addItem(entry.getKey());
		    this.cbbGroup.setItemCaption(entry.getKey(), entry.getValue());
		}
	    }
	} catch (Exception e) {
	    e.printStackTrace();
	}
    }

    public Panel getCreateBOUserPanel() {
	return createBOUserPanel;
    }

    public void setCreateBOUserPanel(Panel addSamplePanel) {
	this.createBOUserPanel = addSamplePanel;
    }

    public Label getLblUsername() {
	return lblUsername;
    }

    public void setLblUsername(Label lblUsername) {
	this.lblUsername = lblUsername;
    }

    public Label getLblEmail() {
	return lblEmail;
    }

    public void setLblEmail(Label lblEmail) {
	this.lblEmail = lblEmail;
    }

    public Label getLblEmailFormat() {
	return lblEmailFormat;
    }

    public void setLblEmailFormat(Label lblEmailFormat) {
	this.lblEmailFormat = lblEmailFormat;
    }

    public Label getLblEmployeeId() {
	return lblEmployeeId;
    }

    public void setLblEmployeeId(Label lblEmployeeId) {
	this.lblEmployeeId = lblEmployeeId;
    }

    public Label getLblEmployeeName() {
	return lblEmployeeName;
    }

    public void setLblEmployeeName(Label lblEmployeeName) {
	this.lblEmployeeName = lblEmployeeName;
    }

    public Label getLblGroup() {
	return lblGroup;
    }

    public void setLblGroup(Label lblGroup) {
	this.lblGroup = lblGroup;
    }

    public Button getBtnSave() {
	return btnSave;
    }

    public void setBtnSave(Button btnSave) {
	this.btnSave = btnSave;
    }

    public Button getBtnClear() {
	return btnClear;
    }

    public void setBtnClear(Button btnClear) {
	this.btnClear = btnClear;
    }

    public Button getBtnCancel() {
	return btnCancel;
    }

    public void setBtnCancel(Button btnCancel) {
	this.btnCancel = btnCancel;
    }

    public ComboBox getCbbGroup() {
	return cbbGroup;
    }

    public void setCbbGroup(ComboBox cbbGroup) {
	this.cbbGroup = cbbGroup;
    }

    public TextField getTxtUsername() {
	return txtUsername;
    }

    public void setTxtUsername(TextField txtUsername) {
	this.txtUsername = txtUsername;
    }

    public TextField getTxtEmail() {
	return txtEmail;
    }

    public void setTxtEmail(TextField txtEmail) {
	this.txtEmail = txtEmail;
    }

    public TextField getTxtEmployeeId() {
	return txtEmployeeId;
    }

    public void setTxtEmployeeId(TextField txtEmployeeId) {
	this.txtEmployeeId = txtEmployeeId;
    }

    public TextField getTxtEmployeeName() {
	return txtEmployeeName;
    }

    public void setTxtEmployeeName(TextField txtEmployeeName) {
	this.txtEmployeeName = txtEmployeeName;
    }

    public Label getLblUsernameValidateMessage() {
	return lblUsernameValidateMessage;
    }

    public void setLblUsernameValidateMessage(Label lblUsernameValidateMessage) {
	this.lblUsernameValidateMessage = lblUsernameValidateMessage;
    }

    public Label getLblEmailValidateMessage() {
	return lblEmailValidateMessage;
    }

    public void setLblEmailValidateMessage(Label lblEmailValidateMessage) {
	this.lblEmailValidateMessage = lblEmailValidateMessage;
    }

    public Label getLblEmployeeIdValidateMessage() {
	return lblEmployeeIdValidateMessage;
    }

    public void setLblEmployeeIdValidateMessage(Label lblEmployeeIdValidateMessage) {
	this.lblEmployeeIdValidateMessage = lblEmployeeIdValidateMessage;
    }

    public Label getLblEmployeeNameValidateMessage() {
	return lblEmployeeNameValidateMessage;
    }

    public void setLblEmployeeNameValidateMessage(Label lblEmployeeNameValidateMessage) {
	this.lblEmployeeNameValidateMessage = lblEmployeeNameValidateMessage;
    }

    public HorizontalLayout getRow1Validate() {
	return row1Validate;
    }

    public void setRow1Validate(HorizontalLayout row1Validate) {
	this.row1Validate = row1Validate;
    }

    public HorizontalLayout getRow2Validate() {
	return row2Validate;
    }

    public void setRow2Validate(HorizontalLayout row2Validate) {
	this.row2Validate = row2Validate;
    }

    public HorizontalLayout getRow4Validate() {
	return row4Validate;
    }

    public void setRow4Validate(HorizontalLayout row4Validate) {
	this.row4Validate = row4Validate;
    }

    public HorizontalLayout getRow5Validate() {
	return row5Validate;
    }

    public void setRow5Validate(HorizontalLayout row5Validate) {
	this.row5Validate = row5Validate;
    }

    public Label getLblGroupValidateMessage() {
	return lblGroupValidateMessage;
    }

    public void setLblGroupValidateMessage(Label lblGroupValidateMessage) {
	this.lblGroupValidateMessage = lblGroupValidateMessage;
    }

    public HorizontalLayout getRow6Validate() {
	return row6Validate;
    }

    public void setRow6Validate(HorizontalLayout row6Validate) {
	this.row6Validate = row6Validate;
    }

    public BOUserBean getBoUserBean() {
	return boUserBean;
    }

    public void setBoUserBean(BOUserBean boUserBean) {
	this.boUserBean = boUserBean;
    }

}
